
public class CoffeeMaker {

	private final Boiler boiler;
	private final Warmer warmer;

	public CoffeeMaker(Boiler boiler, Warmer warmer) {
		this.boiler = boiler;
		this.warmer = warmer;
	}

	public void makeCoffee() {
		if (boiler.hasWater() && warmer.hasEmptyPot()) {
			boiler.drain();
			warmer.fill();
		}
	}
}
